#pragma once

#include <iostream>

using namespace std;

class Hanoi {
public:
	/* 汉诺塔移动函数，将n块圆盘从a通过b移动到c*/
	void move(int n, char a, char b, char c) {
		//最后一块圆盘直接从a移动到c
		if (n == 1){
			cout << "move from " << a << " to "<< c << endl;
		}
		else {
			//将a上面的n-1块圆盘通过c移动到b上面
			move(n - 1, a, c, b);
			//将a底部最大的那块圆盘从a移动到c上面
			cout << "move from " << a << " to " << c << endl;
			//将b上的n-1块圆盘通过a移动到c上面
			move(n - 1, b, a, c);
		}
	}
};